﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/BodyMasterPage.Master"
CodeBehind="wfAFPBnd.aspx.cs" Inherits="RH.AFPBnd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
 <script type="text/javascript">

     $(document).ready(function () {
         Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(PageLoaded)
     });

     function PageLoaded(sender, args) {
         ResizeGrid();
         MessageOnPostback();
     }

     function ResizeGrid() {
         internalGridResize("<%= grdList.ClientID %>");
     }

     function demotokenfunction() {
         var vartoken = $("#textFilter").tokenInput("get");
         document.getElementById("<%=hdnFilter.ClientID%>").value = JSON.stringify(vartoken);
     }


 </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
    <div class="DataHeader">
         <table id="TableDataHeader" cellpadding="0" cellspacing="0">
            <tr>
                <td colspan="3">
                    &nbsp;
                </td>
            </tr>
            <tr>
                <td style="width: 5px;">
                    &nbsp;
                </td>
                <td>
                  <%-- <esd:esdButton ID="bttClear" runat="server" Text="Limpiar" Width="80px">
                   </esd:esdButton> --%>
               
                  <%-- <esd:esdButton ID="bttSearch" Runat="server" Text="Buscar" Width="80px" OnClick="bttOk_Click">
                   </esd:esdButton>--%>
                <table width="100%" cellpadding="0" cellspacing="2">
                    <tr>
                        <td rowspan="3">
                            <esd:esdFilterText ID="textFilter" runat="server" />
                        </td>
                        <td style="width: 90px;">
                            <esd:esdButton ID="bttClear" runat="server" Text="Limpiar" Width="80px"></esd:esdButton>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                           <esd:esdButton ID="bttSearch" Runat="server" Text="Buscar" Width="80px" OnClick="bttOk_Click">
                            </esd:esdButton>
                        </td>
                    </tr>
                </table>
            </td>
            <td style="width: 5px;">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="3">
                &nbsp;
            </td>
        </tr>
    </table>
    </div>
    <div class="DataDetail">
        <esd:esdGridView CssClass="esdGridView" ID="grdList" runat="server" ScrollWidth="100%"
            Width="100%" ShowHeaderWhenEmpty="True" AutoGenerateColumns="False" DataKeyNames="RowNumber" OnRowCommand="grdList_RowCommand">
            <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:ImageButton ID="grdBttCmdEdit" CommandName="CmdEdit" CommandArgument="<%# Container.DataItemIndex %>"
                        runat="server" ImageUrl="../Images/Icons/Enabled/Edit.png" ToolTip="Modificar el Registro" />
                </ItemTemplate>
                <HeaderStyle Width="22px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>

            <asp:TemplateField>
                <HeaderTemplate>
                    <esd:esdFilterPanel ID="idCodigo" 
                        Identity="a.idCodigo" 
                        runat="server" 
                        Title="Codigo" 
                        ControlToken="textFilter" 
                        FilterType="esdDateTexbox" />
                </HeaderTemplate>
                <ItemTemplate>
                    <%#Eval("idCodigo")%>
                </ItemTemplate>
            </asp:TemplateField>
          <%--  <asp:BoundField DataField="idAfp" HeaderText="Codigo"></asp:BoundField>--%>
          <asp:TemplateField>
                <HeaderTemplate>
                    <esd:esdFilterPanel ID="dsDescrip" 
                        Identity="a.dsDescrip" 
                        runat="server" 
                        Title="Razon Social " 
                        ControlToken="textFilter" 
                        FilterType="esdDateTexbox" />
                </HeaderTemplate>
                <ItemTemplate>
                    <%#Eval("dsDescrip")%>
                </ItemTemplate>
            </asp:TemplateField>
<%--            <asp:BoundField DataField="dsAfp" HeaderText="Razon Social">
            </asp:BoundField>--%>
            <asp:TemplateField>
                <HeaderTemplate>
                    <esd:esdFilterPanel ID="dsAbrev" 
                        Identity="a.dsAbrev" 
                        runat="server" 
                        Title="Sigla" 
                        ControlToken="textFilter" 
                        FilterType="esdDateTexbox" />
                </HeaderTemplate>
                <ItemTemplate>
                    <%#Eval("dsAbrev")%>
                </ItemTemplate>
            </asp:TemplateField>
<%--            <asp:BoundField DataField="dsAbrev" HeaderText="Sigla">
            </asp:BoundField>--%>
            <asp:BoundField DataField="stAnulado" HeaderStyle-CssClass="hideDataGridColumn"
                ItemStyle-CssClass="hideDataGridColumn"></asp:BoundField>
            </Columns>
            <EmptyDataTemplate>
            <div id="gridempty">
                <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                &nbsp;No existen registros para esta solicitud.
            </div>
            </EmptyDataTemplate>
        </esd:esdGridView>
    </div>
    <asp:HiddenField ID="hdnMsgOPB" runat="server" />
    <asp:HiddenField ID="hdnFilter" runat="server" />
    </ContentTemplate> 
</asp:UpdatePanel>
</asp:Content>